package com.xuanzheng.company.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;

public class CompanyEmployee implements Serializable {
    private String id;
    private String companyId;
    private String userId;
    private String employeeNumber;
    private String position;
    private String department;
    private BigDecimal baseSalary;
    private int status;
    private String reason;
    private String rejectReason;
    private String resignationReason;
    private Timestamp resignationTime;
    private Timestamp createTime;
    private Timestamp updateTime;
    
    // Additional fields for display purposes
    private String userName;
    private String userPhone;
    private String companyName;
    
    // 额外的用户信息字段，用于员工详情展示
    private int userAge;
    private String userEmail;
    private String userAddress;
    private String userIdCard;
    
    public CompanyEmployee() {
    }
    
    // Getters and Setters
    public String getId() {
        return id;
    }
    
    public void setId(String id) {
        this.id = id;
    }
    
    public String getCompanyId() {
        return companyId;
    }
    
    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }
    
    public String getUserId() {
        return userId;
    }
    
    public void setUserId(String userId) {
        this.userId = userId;
    }
    
    public String getEmployeeNumber() {
        return employeeNumber;
    }
    
    public void setEmployeeNumber(String employeeNumber) {
        this.employeeNumber = employeeNumber;
    }
    
    public String getPosition() {
        return position;
    }
    
    public void setPosition(String position) {
        this.position = position;
    }
    
    public String getDepartment() {
        return department;
    }
    
    public void setDepartment(String department) {
        this.department = department;
    }
    
    public BigDecimal getBaseSalary() {
        return baseSalary;
    }
    
    public void setBaseSalary(BigDecimal baseSalary) {
        this.baseSalary = baseSalary;
    }
    
    public int getStatus() {
        return status;
    }
    
    public void setStatus(int status) {
        this.status = status;
    }
    
    public String getReason() {
        return reason;
    }
    
    public void setReason(String reason) {
        this.reason = reason;
    }
    
    public String getRejectReason() {
        return rejectReason;
    }
    
    public void setRejectReason(String rejectReason) {
        this.rejectReason = rejectReason;
    }
    
    public Timestamp getCreateTime() {
        return createTime;
    }
    
    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }
    
    public Timestamp getUpdateTime() {
        return updateTime;
    }
    
    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }
    
    public String getUserName() {
        return userName;
    }
    
    public void setUserName(String userName) {
        this.userName = userName;
    }
    
    public String getUserPhone() {
        return userPhone;
    }
    
    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }
    
    public String getCompanyName() {
        return companyName;
    }
    
    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }
    
    public int getUserAge() {
        return userAge;
    }

    public void setUserAge(int userAge) {
        this.userAge = userAge;
    }

    public String getUserEmail() {
        return userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    public String getUserAddress() {
        return userAddress;
    }

    public void setUserAddress(String userAddress) {
        this.userAddress = userAddress;
    }

    public String getUserIdCard() {
        return userIdCard;
    }

    public void setUserIdCard(String userIdCard) {
        this.userIdCard = userIdCard;
    }
    
    public String getResignationReason() {
        return resignationReason;
    }

    public void setResignationReason(String resignationReason) {
        this.resignationReason = resignationReason;
    }

    public Timestamp getResignationTime() {
        return resignationTime;
    }

    public void setResignationTime(Timestamp resignationTime) {
        this.resignationTime = resignationTime;
    }
    
    // 获取带掩码的身份证号（中间10位用*代替）
    public String getMaskedIdCard() {
        if (userIdCard == null || userIdCard.length() < 15) {
            return userIdCard;
        }
        int length = userIdCard.length();
        return userIdCard.substring(0, 4) + "**********" + userIdCard.substring(length - 4);
    }
    
    @Override
    public String toString() {
        return "CompanyEmployee{" +
                "id='" + id + '\'' +
                ", companyId='" + companyId + '\'' +
                ", userId='" + userId + '\'' +
                ", employeeNumber='" + employeeNumber + '\'' +
                ", position='" + position + '\'' +
                ", department='" + department + '\'' +
                ", baseSalary=" + baseSalary +
                ", status=" + status +
                ", reason='" + reason + '\'' +
                ", rejectReason='" + rejectReason + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", userName='" + userName + '\'' +
                ", userPhone='" + userPhone + '\'' +
                ", companyName='" + companyName + '\'' +
                '}';
    }
} 